FROM golang:alpine as builder
COPY / /build/
RUN env CGO_ENABLED=0 go build -C /build -o evaluator -ldflags "-s -w"

FROM scratch
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /
COPY --from=builder /build/evaluator /
ENV ZONEINFO=/zoneinfo.zip
ENTRYPOINT ["/evaluator"]
CMD []
